﻿Imports DataAcessLayer

Partial Public Class WebForm5
    Inherits System.Web.UI.Page

    Dim DAL As New DAL

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Preenchimento()

    End Sub

    Protected Sub Preenchimento()

        gvVotacaoTrofeus.DataSource = DAL.ObterVotacaoTrofeusSP.ToList
        gvVotacaoTrofeus.DataBind()

        gvVotacaoMVP.DataSource = DAL.ObterVotacaoMVPSP.ToList
        gvVotacaoMVP.DataBind()

    End Sub

    Protected Sub gvVotacaoTrofeus_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvVotacaoTrofeus.PageIndexChanging
        gvVotacaoTrofeus.PageIndex = e.NewPageIndex
        Preenchimento()
    End Sub

    Protected Sub gvVotacaoMVP_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvVotacaoMVP.PageIndexChanging
        gvVotacaoMVP.PageIndex = e.NewPageIndex
        Preenchimento()
    End Sub
End Class